<template>
  <a-table :columns="columns" :data-source="data">
    <a slot="name" slot-scope="text">{{ text }}</a>
  </a-table>
</template>
<script>
const columns = [
  {
    title: '假期类型',
    dataIndex: 'type',
    key: 'type',
    ellipsis: true,
  },
  {
    title: '总时长',
    dataIndex: 'total',
    key: 'total',
    ellipsis: true,
  },
  {
    title: '已休时长',
    dataIndex: 'yet',
    key: 'yet',
    ellipsis: true,
  },
  {
    title: '剩余时长',
    dataIndex: 'remain',
    key: 'remain',
    ellipsis: true,
  },
];

const data = [
  {
    key: '1',
    type: '年假',
    total: 10,
    yet: 5,
    remain:5,
  },
  {
    key: '2',
    type: '病假',
    total: 5,
    yet: 1,
    remain:4,
  },
  {
    key: '3',
    type: '产假',
    total: 0,
    yet: 0,
    remain:0,
  },
];

export default {
  data() {
    return {
      data,
      columns,
    };
  },
};
</script>
